#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QFileInfoList>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class QUdpSocket;
class QProcess;

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_pushButton_cancel_clicked();
    void process();

private:
    Ui::Widget *ui;
    bool m_cancel;

    QUdpSocket *m_socket;
    QProcess *m_backend;
    QString m_backendpath;

    void decryptFile(const QString &filepath);
    QFileInfoList traverseDir(const QString &dirpath);
};
#endif // WIDGET_H
